﻿using System;
using System.Drawing;
using Tank90.Properties;

namespace Tank90
{
    public class Equipment : Element
    {
        private readonly Image[] images =
        {
            Resources.AddLife, Resources.AddPower, Resources.EnemyStatic, Resources.EnemyBlast, Resources.EquipEmenyless
        };

        private readonly Random random = new Random();

        private EquipType _enquipType;

        private bool bShow = false;

        public EquipType enquipType
        {
            get { return _enquipType; }
            set
            {
                _enquipType = value;
                GetLocation();
            }
        }

        public override void Drawing(Graphics graphics)
        {
            dirImage = images[(int) enquipType];
            graphics.DrawImage(dirImage, new Point(x, y));
        }

        private void GetLocation()
        {
            x = random.Next(0, 600);
            y = random.Next(0, 600);
        }
    }
}